Shader

Undocumented in source.

Constructors

this
this(IShader shaderImpl)
Undocumented in source.
this
this(IShader shaderImpl, string vertexSource, string fragmentSource)
Undocumented in source.

Members

Functions

addVarLayout
void addVarLayout(ShaderVariablesLayout layout)
Undocumented in source. Be warned that the author may not have intended to support it.
bind
void bind()
Undocumented in source. Be warned that the author may not have intended to support it.
bindArrayOfTextures
void bindArrayOfTextures(IHipTexture[] textures, string varName)

Bind array of textures. - This is handled a little different than simply blindly binding * to each slot. Since OpenGL, Direct3D and Metal handles that differently, a more general solution is required.

deleteShaders
void deleteShaders()
Undocumented in source. Be warned that the author may not have intended to support it.
findByName
ShaderVar* findByName(string name, bool isUnused)
Undocumented in source. Be warned that the author may not have intended to support it.
get
ShaderVar* get(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
loadShaders
ShaderStatus loadShaders(string vertexShaderSource, string fragmentShaderSource, string shaderPath)
Undocumented in source. Be warned that the author may not have intended to support it.
loadShadersFromFiles
ShaderStatus loadShadersFromFiles(string vertexShaderPath, string fragmentShaderPath)
Undocumented in source. Be warned that the author may not have intended to support it.
onRenderFrameEnd
void onRenderFrameEnd()
Undocumented in source. Be warned that the author may not have intended to support it.
opDispatch
auto opDispatch()
Undocumented in source. Be warned that the author may not have intended to support it.
opDispatch
auto opDispatch(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
reload
bool reload()
Undocumented in source. Be warned that the author may not have intended to support it.
reloadShaders
ShaderStatus reloadShaders()
Undocumented in source. Be warned that the author may not have intended to support it.
sendVars
void sendVars()
Undocumented in source. Be warned that the author may not have intended to support it.
setBlending
void setBlending(HipBlendFunction src, HipBlendFunction dest, HipBlendEquation eq)
Undocumented in source. Be warned that the author may not have intended to support it.
setDefaultBlock
void setDefaultBlock(string blockName)

This creates a state in the current shader to which block will be accessed when using setVertexVar(".property"). If no default block is set ("") .property will always access the first block defined

setFragmentVar
void setFragmentVar(string name, T val, bool validateData)

If validateData is true, it will compare if the data has changed for choosing whether it should or not send to the GPU.

setFromPreset
void setFromPreset(HipShaderPresets preset)
Undocumented in source. Be warned that the author may not have intended to support it.
setVertexAttribute
void setVertexAttribute(uint layoutIndex, int valueAmount, uint dataType, bool normalize, uint stride, int offset)
Undocumented in source. Be warned that the author may not have intended to support it.
setVertexVar
void setVertexVar(string name, T val, bool validateData)

If validateData is true, it will compare if the data has changed for choosing whether it should or not send to the GPU.

unbind
void unbind()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

defaultLayout
ShaderVariablesLayout defaultLayout;
Undocumented in source.
fragmentShader
FragmentShader fragmentShader;
Undocumented in source.
fragmentShaderPath
string fragmentShaderPath;
Undocumented in source.
internalFragmentSource
string internalFragmentSource;
Undocumented in source.
internalVertexSource
string internalVertexSource;
Undocumented in source.
layouts
ShaderVariablesLayout[string] layouts;
Undocumented in source.
shaderImpl
IShader shaderImpl;
Undocumented in source.
shaderProgram
ShaderProgram shaderProgram;
Undocumented in source.
vertexShader
VertexShader vertexShader;
Undocumented in source.
vertexShaderPath
string vertexShaderPath;
Undocumented in source.

Inherited Members

From IReloadable

reload
bool reload()
Undocumented in source.

Meta